﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;

namespace Elev.Loger
{
    public class Loger
    {
        private static object sysc = new object();

        private Loger loger = null;

        public Loger GetInstance()
        {
            if (loger == null)
            {
                lock (sysc)
                {
                    if (loger == null) { loger = new Loger(); }
                }
            }
            return loger;
        }
        public void Debug(object obj, Exception ex = null)
        {
            var log = LogManager.GetLogger("");
            log.Debug(obj, ex);
        }

        public void Error(object obj, Exception ex = null)
        {
            var log = LogManager.GetLogger("");
            log.Error(obj, ex);
        }
    }
}
